import moment from 'moment'
const lock_field = {
    "addDisplay": false,
    "addDisabled": false,
    "editDisplay": false,
    "editDisabled": true,
    "showColumn": false,
};
export const tableOption = {
    "border": true,
    "index": true,
    "indexLabel": "序号",
    "stripe": true,
    "menuAlign": "center",
    "align": "center",
    "searchMenuSpan": 6,
    "column": [{
        ...lock_field,
        "type": "input",
        "label": "编号",
        "prop": "tuanduiId"
    }, {
        ...lock_field,
        "type": "input",
        "label": "学籍号",
        "prop": "tuanduiStudent"
    }, {
        ...lock_field,
        "type": "input",
        "label": "学期编号",
        "prop": "tuanduiTerm"
    }, {
        "type": "input",
        "label": "团队名称",
        "prop": "tuanduiTeam",
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        "type": "daterange",
        "label": "起止日期",
        "prop": "tuanduiDate",
        "format": "yyyy-MM-dd",
        "valueFormat": "yyyy-MM-dd 00:00:00",
        "span": 14,
        "value": [moment().format('YYYY-MM-DD 00:00:00'), moment().format('YYYY-MM-DD 00:00:00')],
        formatter: (row, value, label, column) => { return value.join(' 至 ').replace(/00:00:00/g, '') },
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        "type": "input",
        "label": "组织单位",
        "prop": "tuanduiSponsor",
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        "type": "input",
        "label": "指导教师",
        "prop": "tuanduiInstructor",
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        ...lock_field,
        "type": "input",
        "label": "创建人",
        "prop": "tuanduiCreateUser"
    }, {
        ...lock_field,
        "type": "input",
        "label": "",
        "prop": "tuanduiCreateTime"
    }, {
        ...lock_field,
        "type": "input",
        "label": "创建人",
        "prop": "tuanduiApproveUser"
    }, {
        ...lock_field,
        "type": "input",
        "label": "",
        "prop": "tuanduiApproveTime"
    }]
}